package com.ecspace.knowledgegraphapi.domain.dto;

/**
 * @author: cs
 * @date: 2024-07-01 11:38:56
 * @since: 1.0
 */
public class BusinessInfo {

    public static final String success = "success";

    public static final String fail = "fail";

    private Integer code;

    private String type;

    private String content;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public static BusinessInfo getSuccessInfo(String content) {
        BusinessInfo info = new BusinessInfo();
        info.setCode(1);
        info.setType(success);
        info.setContent(content);
        return info;
    }

    public static BusinessInfo getFailInfo(String content) {
        BusinessInfo info = new BusinessInfo();
        info.setCode(-1);
        info.setType(fail);
        info.setContent(content);
        return info;
    }


}
